﻿@Imports SchoolClick.Database.jqGrid
@Code
    ViewBag.Title = "Ingreso de las notas del examen de admisión de los alumnos pre-seleccionados"
    Dim year = Date.Now.AddYears(1).Year
    
    Dim grid = New JqGridHelper(Of MATRICULA_NOTAS_PRESELECT)("table-notas",
        dataType:=JqGridDataTypes.Json,
        methodType:=JqGridMethodTypes.Post,
        pager:=True,
        rowsNumber:=20,
        sortingName:="Nombre",
        sortingOrder:=JqGridSortingOrders.Asc,
        viewRecords:=True,
        width:=920,
        height:=465,
        editingUrl:="/RegistroAcademico/_save_jqGrid_row_nota_preselec",
        onSelectRow:="$.handlerjqGridOnSelectedRowForNotas"
    ).Navigator(New JqGridNavigatorOptions() With {.Add = False, .Edit = False, .Delete = False, .Search = False}
    ).InlineNavigator(New JqGridInlineNavigatorOptions() With {.Edit = True, .Add = False})
    
End Code
@Section SetSubMenuActive @Html.DefinirSubMenuSelected(34) End Section
@Section AppBarTitulo <div id="jerti-appbar"><h1>Formulario para el ingreso de notas del examen de admisión @year</h1></div> End Section
<div id="jerti-content" data-year-ae="@ViewBag.Year">
    @Html.TableFields(String.Format("Grados disponibles en el periodo de matrícula {0}", year)
        ).AddField("cmbGrados", "Seleccione el grado donde se ingresaran las notas", JFControlType.ComboBox, New JFOptionsFields().setSource(Url.Action("_getGradosDisponibles_AJAX", "Matricula"))
    ).SetTableWidth(920
    ).AddJavaScript(grid.GetJavaScript.ToHtmlString
    ).AddJavaScript("$('#cmbGrados').on({change: function () {$('#table-notas').jqGrid('setGridParam', { url: '/RegistroAcademico/_get_matricula_AlumnosPreselect?Grado=' + this.value}).trigger('reloadGrid');},loadSuccess: function () {$('#table-notas').jqGrid('setGridParam', { url: '/RegistroAcademico/_get_matricula_AlumnosPreselect?Grado=' + this.value}).trigger('reloadGrid');}});")
    
    @Html.TituloFieldSet("Listado de alumnos")
    @grid.GetHtml()
    <br />
    <br />
</div>